﻿namespace HuaWei.CommComp
{
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraTreeList;
    using DevExpress.XtraTreeList.Columns;
    using HuaWei.CommClass;
    using HuaWei.Windows.Forms;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    public class FrmBSJG : Form
    {
        [CompilerGenerated]
        private string _str;
        [CompilerGenerated]
        private string _str1;
        private BindingSource bindingSource;
        private Button btnCancel;
        private Button btnOK;
        private TreeListColumn colJGMC;
        private IContainer icontainer = null;
        private TreeListColumn LfoCoObmo;
        private Panel panel1;
        private RepositoryItemComboBox repositoryItemComboBox1;
        private RepositoryItemLookUpEdit repositoryItemLookUpEdit1;
        private TreeList tlBsJG;

        public FrmBSJG()
        {
            this.InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.method();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.icontainer != null))
            {
                this.icontainer.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.icontainer = new Container();
            this.panel1 = new Panel();
            this.btnCancel = new Button();
            this.btnOK = new Button();
            this.tlBsJG = new TreeList();
            this.LfoCoObmo = new TreeListColumn();
            this.colJGMC = new TreeListColumn();
            this.repositoryItemLookUpEdit1 = new RepositoryItemLookUpEdit();
            this.repositoryItemComboBox1 = new RepositoryItemComboBox();
            this.bindingSource = new BindingSource(this.icontainer);
            this.panel1.SuspendLayout();
            this.tlBsJG.BeginInit();
            this.repositoryItemLookUpEdit1.BeginInit();
            this.repositoryItemComboBox1.BeginInit();
            ((ISupportInitialize) this.bindingSource).BeginInit();
            base.SuspendLayout();
            this.panel1.Controls.Add(this.btnCancel);
            this.panel1.Controls.Add(this.btnOK);
            this.panel1.Dock = DockStyle.Bottom;
            this.panel1.Location = new Point(0, 0x177);
            this.panel1.Name = "panel1";
            this.panel1.Size = new Size(530, 30);
            this.panel1.TabIndex = 0;
            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnCancel.Location = new Point(0x1ad, 3);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x4b, 0x17);
            this.btnCancel.TabIndex = 1;
            this.btnCancel.Text = "取消";
            this.btnCancel.UseVisualStyleBackColor = true;
            this.btnOK.Location = new Point(0x15c, 3);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new Size(0x4b, 0x17);
            this.btnOK.TabIndex = 0;
            this.btnOK.Text = "确定";
            this.btnOK.UseVisualStyleBackColor = true;
            this.btnOK.Click += new EventHandler(this.btnOK_Click);
            this.tlBsJG.Columns.AddRange(new TreeListColumn[] { this.LfoCoObmo, this.colJGMC });
            this.tlBsJG.DataSource = this.bindingSource;
            this.tlBsJG.Dock = DockStyle.Fill;
            this.tlBsJG.ImageIndexFieldName = "";
            this.tlBsJG.Location = new Point(0, 0);
            this.tlBsJG.Name = "tlBsJG";
            this.tlBsJG.OptionsBehavior.Editable = false;
            this.tlBsJG.OptionsView.ShowColumns = false;
            this.tlBsJG.ParentFieldName = "PID";
            this.tlBsJG.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemLookUpEdit1, this.repositoryItemComboBox1 });
            this.tlBsJG.Size = new Size(530, 0x177);
            this.tlBsJG.TabIndex = 1;
            this.tlBsJG.DoubleClick += new EventHandler(this.tlBsJG_DoubleClick);
            this.LfoCoObmo.FieldName = "ID";
            this.LfoCoObmo.Name = "colID";
            this.colJGMC.FieldName = "JGMC";
            this.colJGMC.MinWidth = 0x23;
            this.colJGMC.Name = "colJGMC";
            this.colJGMC.Visible = true;
            this.colJGMC.VisibleIndex = 0;
            this.colJGMC.Width = 0x9e;
            this.repositoryItemLookUpEdit1.AutoHeight = false;
            this.repositoryItemLookUpEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemLookUpEdit1.Name = "repositoryItemLookUpEdit1";
            this.repositoryItemComboBox1.AutoHeight = false;
            this.repositoryItemComboBox1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemComboBox1.Name = "repositoryItemComboBox1";
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize = new Size(530, 0x195);
            base.Controls.Add(this.tlBsJG);
            base.Controls.Add(this.panel1);
            base.Name = "FrmBSJG";
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text = "选择机构";
            this.panel1.ResumeLayout(false);
            this.tlBsJG.EndInit();
            this.repositoryItemLookUpEdit1.EndInit();
            this.repositoryItemComboBox1.EndInit();
            ((ISupportInitialize) this.bindingSource).EndInit();
            base.ResumeLayout(false);
        }

        private void method()
        {
            DataRow dataRow = DHelp.GetDataRow(this.bindingSource);
            if (dataRow != null)
            {
                this.ID = dataRow["ID"].ToString();
                this.JGMC = dataRow["JGMC"].ToString();
                base.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            else
            {
                MsgBox.ShowMsg("当前没有选择机构，请选择!");
            }
        }

        public void SetBs(DataTable dt)
        {
            this.bindingSource.DataSource = dt;
        }

        private void tlBsJG_DoubleClick(object sender, EventArgs e)
        {
            this.method();
        }

        public string ID
        {
            [CompilerGenerated]
            get
            {
                return this._str;
            }
            [CompilerGenerated]
            set
            {
                this._str = value;
            }
        }

        public string JGMC
        {
            [CompilerGenerated]
            get
            {
                return this._str1;
            }
            [CompilerGenerated]
            set
            {
                this._str1 = value;
            }
        }
    }
}

